const {
	Controller
} = require('egg');

class BaseController extends Controller {
	result(success,data){
		this.ctx.body={
			success,
			data
		}
	}
	
	success(data){
		this.ctx.body={
			success:true,
			data
		}
	}
	
	fail(msg){
		this.ctx.body={
			success:false,
			data:msg
		}
	}
}

module.exports = BaseController;